package com.cdz.mapper;


import com.cdz.domain.ChargingPileInfo;
import com.cdz.domain.Firmware;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

@Mapper
public interface OtaMapper {

    Firmware selectBin();

    void setUpdate1();

//    void setUpdate0();

    void updateCPFile(ChargingPileInfo chargingPileInfo);

    int getUpdateStatus(String chargingPileId);

    @Select("SELECT file_data FROM charging_pile_info WHERE charging_pile_id = #{chargingPileId}")
    @Results({
            @Result(column = "file_data", property = "fileData", jdbcType = JdbcType.BLOB)
    })
    ChargingPileInfo selectOneBin(@Param("chargingPileId") String chargingPileId);

}

